The present invention relates to a method and/or architecture for integrating video and graphics processing in a single processor generally and, more particularly, to data modification used to allow changes in sampling structure for video to graphics data conversion.
Digital video and/or graphics systems sample and store video in one of a number of formats, each of which include a Y and a C component (the Y component refers to a luminance component of the video and the C component refers to a chrominance component (i.e., a U, V pair)). For convenience with video formats, the Y data is normally stored as a block in one region of memory and the C data (the U, V pairs) is stored as a separate block. For simplicity, the present application will refer to all video and graphics components/samples as 8-bit quantities.
Referring to FIG. 1, a conventional video format 4:2:0 is shown. The video format 4:2:0 has one C sample (i.e., one U, V sample pair) for every group of four Y samples. The effective sample point for the C component is in a center of a square of Y components. In the 4:2:0 format of FIG. 1, an amount of Y component storage required (i.e., 4) is twice that required for the C component (i.e., 2), since each C component comprises a U and a V value.
Referring to FIG. 2, a conventional video format 4:2:2 is shown. The video format 4:2:2 has one U,V sample pair for every pair of Y samples. In the 4:2:2 format of FIG. 2, the C sampling point is coincident with every other Y sample point along a raster line. In the 4:2:2 format, the amount of Y component storage required is identical to that required for the C component.
Referring to FIG. 3, a conventional video format 4:4:4 is shown. The video format 4:4:4 has an identical sample structure for the Y, U and V components. In the 4:4:4 format of FIG. 3, the amount of C component storage required is twice that required for the Y component. The 4:4:4 sampling structure is identical to that used for YUV format graphics data (i.e., 24-bit-per-pixel YUV, or 32-bpp xcex1YUV-8888).
Approaches for conversion between video formats change the number of chrominance samples C relative to the luminance samples Y. In particular, to convert video data to graphics data, the following operations are required, where all conversions use the video format 4:4:4 as a common conversion step (i.e., conversion from 4:2:0, 4:2:2 or 4:4:4 video format to 4:4:4 graphics data):
(i) scaling and filtering operations in both the horizontal and vertical directions are necessary for conversion from 4:2:0 to 4:4:4. Since none of the existing 4:2:0 chrominance C sampling points are aligned with the luminance Y points, it is necessary to interpolate a complete set of C values using either 0.75:0.25 or 0.25:0.75 coefficient pairs for the interpolation;
(ii) scaling and filtering operations in the horizontal direction only is necessary for conversion from 4:2:2 to 4:4:4. All xe2x80x9cevenxe2x80x9d samples along the register line (counting the first sample as sample 0) already have an accurate U,V co-sited sample which can remain unchanged. For xe2x80x9coddxe2x80x9d samples a new value must be calculated. The value can be calculated by interpolating horizontally between the neighboring two xe2x80x9cevenxe2x80x9d sample values for U and V; or
(iii) interleaving of data is required to combine the separate Y and C data blocks into 24-bpp YUV pixels for conversion from 4:4:4 to graphics YUV. Conversion from 4:4:4 to graphics RGB is similar to conversion to graphics YUV, and followed by a color conversion step to change from YUV to RGB.
It is therefore generally desirable to provide a method and/or architecture capable of video/graphics sampling structure conversion.
The present invention concerns an apparatus comprising a data modification circuit and a composite circuit. The data modification circuit may be configured to generate a first and second video component in response to a video data stream. The composite circuit may be configured to present an output graphics stream by interleaving the first and the second video component.
The objects, features and advantages of the present invention include providing a method and/or architecture for implementing a video sampling structure conversion engine that may also permit interleaving of Y and C component video data into a single video data stream which may then be easily converted to a graphics data format.